require "../../dot"

Dot.new { |dot|
  dot.digraph (:structs) { |dig|
    dig.node :shape=>:record
    dig.struct1 :shape=>:record, :label=>'<f0> left|<f1> middle|<f2> right'
    dig.struct2 :shape=>:record, :label=>'<f0> one|<f1> two'
    dig.struct3 :shape=>:record, :label=>'hello\nworld |{b |{c|<here> d|e}| f}'\
                                         '| g | h'
    dig.connect 'struct1:f1', 'struct2:f0'
    dig.connect 'struct1:f2', 'struct3:here'
  }
}.compile :O, :T=>:png